package com.flexcodejam.vfd.business
{
	
	import mx.rpc.IResponder;
	import com.adobe.cairngorm.business.ServiceLocator;
	import mx.rpc.events.FaultEvent;
	import mx.rpc.events.ResultEvent;
	import com.flexcodejam.vfd.vo.Donation;
	

	
	public class DonationDelegate
	{
		
		private var responder : IResponder;
		private var service : Object;
		
		public function DonationDelegate( responder : IResponder )
		{		
			this.service = ServiceLocator.getInstance().getRemoteObject("DonationService" );
			this.responder = responder;
		}
		
		
		public function GetDonationByUserId(donation:Donation): void
		{
			//Save Comment Object
			var call : Object = service.MakeDonation(donation);
			call.addResponder( responder );
		}
		
		
		
		public function SaveDonation(donation:Donation): void
		{
			//Save Comment Object
			var call : Object = service.MakeDonation(donation);
			call.addResponder( responder );
		}	
		
		
		
	}
}